<?php
session_start();
	if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
		header('Location: ./');
	}
	$personId = (int)$_GET['id'];
	
	// Connect to the DB.
	require_once 'include/config.lib.php';
	require_once 'include/database.lib.php';
	
	//require_once 'conference-admin/registerations.php';
	
	ConnectToDB();
	
	// Load summary data about the person.
	$personReq = DBExecute('SELECT * FROM person AS p, (
														SELECT COUNT(DISTINCT authoring.resourceid) AS authorcount FROM authoring WHERE authoring.personid=?
													) AS a, (
														SELECT COUNT(DISTINCT reading.resourceid) AS readingcount FROM reading WHERE reading.personid=?
													) AS r, (
														SELECT COUNT(DISTINCT annotation.resourceid) AS reviewcount, COUNT(*) AS commentcount FROM annotation WHERE personid=?
													) AS c WHERE p.id=?', array($personId, $personId, $personId, $personId));
	$person = $personReq->fetchAssocRow();

	$showReq = DBExecute("SELECT EMAIL, AFFILIATION, DESCRIPTION, SHOWNAME, SHOWAFFILIATION, SHOWJOINDATE, SHOWDESCRIPTION, SHOWFRIENDLIST, SHOWPAPER, SHOWEMAIL, SHOWPUBLICATION FROM DB2INST1.person WHERE ID = ".$personId."");
	
	$showornot = $showReq->fetchAssocRow();
	
	//conference:
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="third_party/jquery-ui-1.8.5/jquery-ui-1.8.5.custom.css" />
<link rel="stylesheet" type="text/css" href="css/template.css" />
<link rel="stylesheet" type="text/css" href="css/person_view.css" />
<link rel="stylesheet" type="text/css" href="css/conference_admin.css" />
<link rel="stylesheet" type="text/css" href="css/network_styles.css" />
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="third_party/jit.js"></script>
<script type="text/javascript" src="third_party/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="third_party/jquery-ui-1.8.5/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript" src="js/system.js"></script>
<script type="text/javascript" src="js/timechart.js"></script>
<script type="text/javascript" src="js/network_custom.js"></script>
<script type="text/javascript" src="js/network.js"></script>
<script type='text/javascript'>
var personId = <?php echo $personId; ?>;
function GInitialize() {
	var timechart = new TimeChart(document.getElementById("timeline-chart"));
	RequestData("data.php", { "requestType": "timechartp", "id": personId }, timechart.update);
}

google.load('visualization', '1', {'packages':['annotatedtimeline']});
google.setOnLoadCallback(GInitialize);

function OnLoad() {
	networkWidget = new Network("network", null, new NetworkCustom('person'));
	RequestData("data.php", { "requestType": "personnetwork", "id": personId }, networkWidget.update);
}


$(function() {
	$("#tabs").tabs();
	$("#maintabs").tabs();
	$("input.date").datepicker();

	//conference:
	$("#tabs-admin").tabs();
});
</script>
<!?php
//should be here, because it needs the stylesheets.  
require_once 'conference-admin/registerations.php';
?>
<title>Forum</title>
</head>
<body onload="OnLoad();">

<?php //to determine whether a user has logged in or not, which will output different buttons
if(isset($_SESSION["accountNo"]))	{	$inorout = "controller/logout.php";	$display = "Log out";}
else	{	$inorout = "login.php";	$display = "Log in";}
?>

	<div id="body-wrapper">
	<?php include_once 'static/header.php'; ?>
		<div id="body">
			<!-- START SECTION: summary -->
			<div id="summary-section" class="section">
				<table id="stat" class="info">
					<tr><th>Papers Published:</th><td><?php echo $person['AUTHORCOUNT']; ?></td></tr>
					<tr><th>Papers Read:</th><td><?php echo $person['READINGCOUNT']; ?></td></tr>
					<tr><th>Papers Reviewed:</th><td><?php echo $person['REVIEWCOUNT']; ?></td></tr>
					<tr><th>Comments:</th><td><?php echo $person['COMMENTCOUNT']; ?></td></tr>
					<tr><th>Latest Activity:</th><td><?php echo $person['LATESTACTIVITY']; ?></td></tr>
				</table>
				<table id="summary" class="info">
					<tr>
						<th rowspan="6"><img src="image/person.png" /></th>
						<td colspan="2"><h1><?php echo $person['USERNAME']; ?></h1></td>
					</tr>
					<tr><th>Name:</th><td><?php if($showornot["SHOWNAME"] == 'y'||$_SESSION["accountNo"] == $person['USERNAME'])	{	echo $person['NAME'];	} ?></td></tr>
					<tr><th>Email:</th><td><?php if($showornot["SHOWEMAIL"] == 'y'||$_SESSION["accountNo"] == $person['USERNAME'])	{	echo $person['EMAIL'];	} ?></td></tr>
					<tr><th>Affiliation:</th><td><?php if($showornot["SHOWAFFILIATION"] == 'y'||$_SESSION["accountNo"] == $person['USERNAME'])	{	echo $person['AFFILIATION'];	} ?></td></tr>
					<tr><th>Join Date:</th><td><?php if($showornot["SHOWJOINDATE"] == 'y'||$_SESSION["accountNo"] == $person['USERNAME'])	{	echo $person['JOINDATE'];	} ?></td></tr>
					<tr><th>Description:</th><td><?php if($showornot["SHOWDESCRIPTION"] == 'y'||$_SESSION["accountNo"] == $person['USERNAME'])	{	echo $person['DESCRIPTION'];	} ?></td></tr>
				</table>
			</div>
			<!-- END SECTION: summary -->
		
			<div id="details-section" class="section">
				<div id="maintabs" style="overflow:hidden;">
					<ul> 
						<li><a href="#maintabs-1">Overview</a></li>
<!--						<li><a href="#maintabs-2">Friends</a></li>-->
						<li><a href="#maintabs-3">Publications</a></li>
						<li><a href="#maintabs-4">Settings</a></li>
<!--						<li><a href="#maintabs-5">Links to me</a></li>-->
						<li><a href="#maintabs-6">Administration</a></li>
					</ul>
					<div id="maintabs-1">
						<!-- START SECTION: timeline -->
						<div id="timeline-section" class="section"><div id="timeline-chart"></div></div>
						<!-- END SECTION: summary --> 
						
						<!-- START SECTION: social graph -->
						<div id="network-section" class="left-section"><div id="network"></div><a href="#network" class="button" onclick="javascript:showElement('collapse')"><span id = "guidance">Network Guidance</span></a><div id="network-guide"></div></div>
						<!-- END SECTION: social graph -->
						
						<!-- START SECTION: recent -->
						<div id="activity-section" class="right-section">
							<div id="tabs" style="overflow:hidden;">
								<ul> 
									<li><a href="#tabs-1">Reviewed Papers</a></li>
									<li><a href="#tabs-2">Interactions</a></li>
									<li><a href="#tabs-3">Comments</a></li>
								</ul>
								<div id="tabs-1"> 
									<ul class="list">
									<?php
									$stmt = DBExecute("	SELECT a.*,annotation.datecreated,annotation.annofabid,bibtex.title,bibtex.abstract 
																			FROM (
																				SELECT DISTINCT r.bibtexid,
																					MAX(annotation.id) AS aid,
																					MAX(reading.date) AS rdate,
																					AVG(rateresource.total) AS total 
																				FROM resource AS r,reading,resource AS rr 
																				LEFT JOIN rateresource ON rateresource.resourceid=rr.id 
																				LEFT JOIN annotation ON annotation.resourceid=rr.id 
																				WHERE reading.resourceid=r.id 
																				AND rr.bibtexid = r.bibtexid 
																				AND reading.personid=? 
																				GROUP BY r.bibtexid
																			) AS a 
																			LEFT JOIN bibtex ON bibtex.id = a.bibtexid 
																			LEFT JOIN annotation ON annotation.id = a.aid 
																			ORDER BY a.rdate DESC;", $personId);
									
									while($row = $stmt->fetchAssocRow()) { 
										?>
										<li>
											<div class="rating"><?php echo empty($row['TOTAL']) ? "N/A" : $row['TOTAL']; ?></div><br>
											<a href="paper_view.php?id=<?php echo $row['BIBTEXID']; ?>"><span class="title"><?php echo (empty($row['TITLE'])) ? "Paper ".$row['BIBTEXID'] : $row['TITLE']; ?></span></a>
											<div class="abstract">
											<?php //echo empty($row['DATECREATED']) ? 'No abstract available.' : 'Abstract: '.substr($row['ABSTRACT'], 200).'...'; ?>
											<small>Visited: <?php echo $row['RDATE'], empty($row['DATECREATED']) ? "" : " / Last update: ", $row['DATECREATED'], empty($row['DATECREATED']) ? "" : " by ", preg_replace('/-.*$/','',$row['ANNOFABID']); ?></small>
											</div>
										</li>
									<?php
									} ?>
									</ul>
								</div> 
								
								<div id="tabs-2"> 
									<ul class="list">
									<?php
									$row = DBExecute("SELECT username FROM person WHERE id=?",$personId)->fetchAssocRow();
									$username = $row['USERNAME'];
									$personname = $row['USERNAME']."-%";
									$stmt = DBExecute("	SELECT c.*,person.email,person.name,person.id,person.affiliation
					                            FROM (
					                              SELECT b.count,b.other,annotation.datecreated,annotation.resourceid,bibtex.title
					                              FROM (
					                                SELECT COUNT(*) AS count, a.other, MAX(a.id) AS aid
					                                FROM (
					                                  SELECT SUBSTR(replytofabid,1,LOCATE('-',replytofabid)-1) AS other,
					                                  datecreated,resourceid,id 
					                                  FROM annotation 
					                                  WHERE annofabid LIKE ? 
					                                  AND replytofabid IS NOT NULL 
					                                  AND replytofabid NOT LIKE ?
					                                  UNION SELECT SUBSTR(annofabid,1,LOCATE('-',annofabid)-1) AS other,
					                                  datecreated,resourceid,id
					                                  FROM annotation 
					                                  WHERE replytofabid LIKE ? 
					                                  AND annofabid NOT LIKE ?
					                                ) AS a
					                                GROUP BY a.other
					                              ) AS b,annotation,resource
					                              JOIN bibtex ON bibtex.id = resource.bibtexid
					                              WHERE annotation.id = b.aid 
					                              AND resource.id = annotation.resourceid
					                            ) AS c,person
					                            WHERE person.username = c.other ORDER BY datecreated DESC", array($personname, $personname, $personname, $personname));
					
									while ($row = $stmt->fetchAssocRow()) {
										if ($row['OTHER']) { ?>
											<li><a href="person_view.php?id=<?php echo $row['ID']; ?>">
													<img src="image/person.png" height="80px"/><?php echo preg_replace('/-.*$/','',$row['OTHER']); ?>
												<span class="interactions"><?php echo $row['COUNT']; ?> interactions</span><br />
												Name: <?php echo $row['NAME']; ?><br />
												E-mail: <?php echo $row['EMAIL']; ?><br />
												Affiliation: <?php echo $row['AFFILIATION']; ?><br />
												<small>Last comment on <?php echo $row['DATECREATED']; ?> on <?php echo (empty($row['TITLE'])) ? "Paper ".$row['RESOURCEID'] : $row['TITLE']; ?></small>
											</a></li>
										<?php
										}
									} ?>
									</ul>
								</div>
								
								<div id="tabs-3"> 
									<ul class="list">
									<?php
									$stmt = DBExecute("	SELECT a.*, bibtex.title, bibtex.id AS bid
																			FROM (
																				SELECT a.ratebyanno, a.resourceid, a.annotationbody, a.datecreated AS date, r.bibtexid
																				FROM annotation AS a JOIN resource AS r ON r.id = a.resourceid
																				WHERE a.personid = ?
																			) AS a
																			JOIN bibtex ON bibtex.id=a.bibtexid
																			ORDER BY date DESC", $personId);
					
									while ($row = $stmt->fetchAssocRow()) { ?>
										<li><a href="paper_view.php?id=<?php echo $row['BID']; ?>">
											<span class="comment_body"><?php echo $row['ANNOTATIONBODY']; ?></span><br />
											<span class="rating">Rating:</span>
											<img src="image/<?php
											switch($row['RATEBYANNO']) {
											case 1: echo "Pos"; break;
											case 2: echo "Neg"; break;
											case 4: echo "Info"; break;
											default: echo "Neut"; break;
											} ?>.gif"><br />
											<small>Made on <?php echo empty($row['DATE']) ? "None" : $row['DATE'] ?> on <?php echo (empty($row['TITLE'])) ? "Paper ".$row['BID'] : $row['TITLE']; ?></small>
										</a></li>
									<?php
									} ?>
									</ul>
								</div>
							</div>
						</div>
						<!-- END SECTION: recent --> 								
					</div> 
					
					
					<div id="maintabs-3">
						<div id="publications">
							<h3><?php echo $person['NAME']; ?>'s Publications</h3>	

							<?php if(isset($_POST['submitCheck'])) {	//Test if the form has already been submitted
								//perform form validation
								$errorTitle = false; $errorTitleLength = false; $errorAuthors = false; $errorAuthorsLength = false; 
								$errorDOI = false; $errorISBN = false; $errorJournal = false; $errorVolume = false; $errorPages = false; $errorYear = false;
								
								// Get data from POST string. Trim spaces
								$title = isset($_REQUEST['title']) ? trim($_REQUEST['title'])  : '';
								$authors = isset($_REQUEST['authors']) ? trim($_REQUEST['authors'])  : '';
								$doi = isset($_REQUEST['doi']) ? trim($_REQUEST['doi'])  : '';
								$isbn = isset($_REQUEST['isbn']) ? trim($_REQUEST['isbn'])  : '';
								$journal = isset($_REQUEST['journal']) ? trim($_REQUEST['journal'])  : '';
								$volume = isset($_REQUEST['volume']) ? trim($_REQUEST['volume'])  : '';
								$pages = isset($_REQUEST['pages']) ? trim($_REQUEST['pages'])  : '';
								$year = isset($_REQUEST['year']) ? trim($_REQUEST['year'])  : '';
								
								//check that mandatory fields are filled in
								if (strlen($title)<4){
									$errorTitleLength = true;	//min field lanegh of 4
								}
								else $errorTitleLength = false;
								
								if (strlen($authors)<3){
									$errorAuthorsLength = true; //min field length of 3
								}
								else $errorAuthorsLength = false;
								
								//check format of fields
								if (!preg_match("/^[a-zA-Z0-9\,\;]*$/", $title)){
									$errorTitle = true;
								}
								else $errorTitle = false;
								
								if (!preg_match("/^[a-zA-Z0-9\,\;]*$/", $authors)){
									$errorAuthors = true;
								}
								else $errorAuthors = false;
								
								if (!preg_match("/^[0-9]*$/", $doi)){
									$errorDOI = true;
								}
								else $errorDOI = false;
								
								if (!preg_match("/^[0-9]*$/", $isbn)){ 
									$errorISBN = true;
								}
								else $errorISBN = false;
								
								if (!preg_match("/^[a-zA-Z0-9]*$/", $journal)){ 
									$errorJournal = true;
								}
								else $errorJournal = false;
								
								if (!preg_match("/^[0-9]*$/", $volume)){ 
									$errorVolume = true;
								}
								else $errorVolume = false;
								
								if (!preg_match("/^[0-9]*$/", $pages)){ 
									$errorPages = true;
								}
								else $errorPages = false;
								
								if (!preg_match("/^[0-9-]*$/", $year)){ 
									$errorYear = true;										
								}
								else $errorYear = false;	
								
								//check if there was an input error
								if($errorTitle==true || $errorTitleLength==true || $errorAuthors==true || $errorAuthorsLength==true || $errorDOI==true || $errorISBN==true || $errorJournal==true || $errorVolume==true || $errorPages==true || $errorYear==true){
									//output error message for invalid field entries
									echo "Invalid input in the following fields: " . "<br/>";
										if ($errorTitle || $errorTitleLength) echo "- Title ". "<br/>";
										if ($errorAuthors || $errorAuthorsLength) echo "- Author(s) ". "<br/>";
										if ($errorDOI) echo "- DOI  ". "<br/>";		
										if ($errorISBN) echo "- ISBN  ". "<br/>";
										if ($errorJournal) echo "- Journal  ". "<br/>";	
										if ($errorVolume) echo "- Volume  ". "<br/>";
										if ($errorPages) echo "- Page(s)  ". "<br/>";
										if ($errorYear) echo "- Year of Publication ". "<br/>";		
									echo "Please correct these fields and resubmit" . "<br/>";
								}
									
								else{	//add the publication to the databse
									
								//CODE TO ADD PUBLICATION TO DB SHOULD GO HERE
									
									echo "The publication was added successfully" . "<br/>";
								}
							} ?>							
							
							<a href="#network" onclick="javascript:showElement('addPaper')">Add Publication</a>				
							<div id="addPaper" style="display:none" class = "section">
								<!-- // in order not to show add publication to others except the user himself/herself-->
								<?php
								if($person['USERNAME'] == $_SESSION["accountNo"]){
									
									
									//Get user ID to anchor the form when user clicks on the Claim Paper button
									$selectid = DBExecute("SELECT id FROM person WHERE username = '".$_SESSION["accountNo"]."'");
									$id = $selectid->fetchAssocRow();//find the person's id to redirect to the person's own page
									$url = "../person_view.php?id=".$id["ID"]."#maintabs-4"; 
								?>

									<form id="claimPaper" action=<?php echo "./person_view.php?id=".$id["ID"]."#maintabs-3"?> method="post">
										<table class="info">
											<tr><th><font size="1"><?php echo "Note that the fields marked with a '*' are required"; ?></font></th></tr>
											<tr><th>Title<font color="red">*</font>:</th><td><input type="text" name="title" size="40"/></td></tr>
											<tr><th>Author(s)<font color="red">*</font>:</th><td><input type="text" name="authors" size="40"/></td></tr>
											<tr><th><font size="1"><?php echo "Separate multiple authors with commas"; ?></font></th></tr>
<!--											<tr><th>DOI:</th><td><input type="text" name="doi" size="40"/></td></tr>-->
<!--											<tr><th>ISBN:</th><td><input type="text" name="doi" size="40"/></td></tr>-->
<!--											<tr><th>Journal:</th><td><input type="text" name="journal" size="40"/></td></tr>-->
<!--											<tr><th>- Volume:</th><td><input type="text" name="volume" size="40"/></td></tr>-->
<!--											<tr><th>- Issue:</th><td><input type="text" name="issue" size="40"/></td></tr>-->
<!--											<tr><th>- Page(s):</th><td><input type="text" name="pages" size="40"/></td></tr>-->
<!--											<tr><th>Year of Publication:</th><td><input type="text" name="year" size="40"/></td></tr>-->
											<tr><th>File Location:</th><td>
											<input type="hidden" name="submitCheck" value=true>
										</table>
										<input type="submit" class="button" value="Claim Paper" />
									</form>
								<?php		
								}
								else 
								{
									echo 'You cannot add publication for others.';
								}
								?>
							</div>

							<div id="current-publications">
								<ul class="list">
					   			<?php
								$stmt = DBExecute("	SELECT a.*,annotation.datecreated,annotation.annofabid,bibtex.title,bibtex.abstract 
													FROM (
													SELECT DISTINCT r.bibtexid,
														MAX(annotation.id) AS aid,
														MAX(reading.date) AS rdate,
														AVG(rateresource.total) AS total 
													FROM resource AS r,reading,resource AS rr 
													LEFT JOIN rateresource ON rateresource.resourceid=rr.id 
													LEFT JOIN annotation ON annotation.resourceid=rr.id
												        LEFT JOIN authoring ON authoring.resourceid=rr.id
												        LEFT JOIN person ON person.id=authoring.personid 
													WHERE reading.resourceid=r.id 
														AND rr.bibtexid = r.bibtexid
												        AND authoring.personid=?
												        AND rr.bibtexid IS NOT NULL
														GROUP BY r.bibtexid
													) AS a 
													LEFT JOIN bibtex ON bibtex.id = a.bibtexid 
													LEFT JOIN annotation ON annotation.id = a.aid 
													ORDER BY a.rdate DESC;", $personId);
								if($showornot["SHOWPUBLICATION"] == 'y')
								{	
										//show publications
										echo "This person allows others to see his/her publication.";
								
									while($row = $stmt->fetchAssocRow()) { 
										?>
										<li>
											<a href="paper_view.php?id=<?php echo $row['BIBTEXID']; ?>"><span class="title"><?php echo (empty($row['TITLE'])) ? "Paper ".$row['BIBTEXID'] : $row['TITLE']; ?></span></a>
											<div class="abstract">
											<div class="rating"> <small>Rating: <?php echo empty($row['TOTAL']) ? "N/A" : $row['TOTAL']; ?></small></div>
											<?php //echo empty($row['DATECREATED']) ? 'No abstract available.' : 'Abstract: '.substr($row['ABSTRACT'], 200).'...'; ?>
											<small>Last updated: <?php echo $row['DATECREATED'], empty($row['DATECREATED']) ? "" : " by ", preg_replace('/-.*$/','',$row['ANNOFABID']); ?></small>
											</div>
										</li>
									<?php
									} 
								}
								else 
								{
									echo "This person doesn't allow others to see his/her publications.";
								}?>
								</ul>
							</div>
						</div>				
					</div> 
			
				<!-- Settings -->
				
				<div id="maintabs-4">
					<?php //content in settings
						if($person['USERNAME'] == $_SESSION["accountNo"])//only the person himself/herself can view his/her own settings
						{	
							//TO_DO show whether it's public or not
							//deleted for conference scenario
							
							//Suggest a code format similar to the one below. Makes it easier to read, and Eclipse formats it nicely
							?> 	
								<form name="name" action="controller/changesetting.php" method="post">
								<table>
								<tr><strong><?php echo $_SESSION["errmsg"]; ?></strong></tr>
								
								<tr>
								<td class="labelright"><strong>New Password</strong></td>
								<td><input type="password" name="newpassword" maxlength="20" size="20" value="" /></td>
								</tr>
								
								<tr>
								<td class="labelright"><strong>Confirm Password</strong></td>
								<td><input type="password" name="confirmpassword" maxlength="20" size="20" value="" /></td>
								</tr>
								
								<tr>
								<td class="labelright"><strong>Affiliation</strong></td>
								<td><input type="text" name="newaffiliation" maxlength="40" size="20" value="<?php echo $showornot["AFFILIATION"]; ?>" /></td>
								</tr>
								
								<!-- deleted radio buttons for public/private for conference scenario -->
								
								<!--  deleted description for conference -->
																
								<tr>
								<td class="labelright"><strong>Email</strong></td>
								<td><input type="text" name="newemail" maxlength="40" size="20" value="<?php echo $showornot["EMAIL"]; ?>" /></td>
								
								
								</tr>
								<!--  deleted for conference scenario -->
								<tr>
								<td></td>
								<td>
								<input type="submit" class="button" value="submit" />
								</td>
								</tr>
								</table>
								
								</form>
						<?php
						}
						
						else {
							//show nothing
						}
					?>
					</div>

			<!--  ADMINISTRATION SECTION -->
					<div id="maintabs-6">
						<div id="admin-section" class="left-section">
						<?php
							if('pcchair' != $_SESSION['role']){
								echo "<script LANGUAGE=\"javascript\"> <!--n";
								echo "document.getElementById('tabs-admin').style.visibility = \"hidden\"n";
								echo "// --> </script>n";
							} 
						?>
							<div id="tabs-admin" style="overflow:hidden;">
								<ul> 
									<li><a href="#tabs-1-admin">Settings</a></li>
									<li><a href="#tabs-2-admin">Reviewers</a></li>
									<li><a href="#tabs-3-admin">Paper Assignments</a></li>
									<li><a href="#tabs-4-admin">Papers</a></li>
								</ul>
								<div id="tabs-1-admin"> 
									<?php include_once './conference-admin/conference_settings.php';?>
								</div> 
								<div id="tabs-2-admin"> 
									<?php include_once './conference-admin/registerations.php';?>
								</div>
								<div id="tabs-3-admin"> 
									tabs - 3: assignments
								</div>
								<div id="tabs-4-admin"> <!-- List of uploaded papers -->
									<?php include_once './conference-admin/submittedpapers.php';?>
								</div>
							</div>
						</div>
				
					 
					</div> 
				</div> 
			</div>
		</div>
	<?php include_once 'static/footer.html'; ?>
	</div>
</body>
</html>
